﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHSJBTNS.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHSJBTNS" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<script type="text/javascript">

    function UCLHSJBTNS_ASPxCallback1Complete(rs) {
        var arr = rs.split('|');
        var type = arr[0];
        var state = arr[1];
        if (state != "0") {
            alert(arr[2]);
        } else {
            //ReloadParent();
            UCLHSJBTNS_hdCollection.Set("type", type);
            if (type == "sl" || type == "bsl" || type == "th" || type == "tjbsx") {
                alert(arr[2]);
               
                parent.layer.closeAll();
                
            } else {
                alert(arr[2]);
                UCLHSJBTNS_hdCollection.Set("LaiHanID", arr[3]);
                UCLHSJBTNS_btnActPerform.onClick();
            }
        }
    }

    //function ReloadParent() {
    //    try {
    //        var open = window.opener;
    //        open.Reload2();
    //    }
    //    catch (ex) {

    //    }
    //}
</script>
<div style="text-align: center;">
    <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="UCLHSJBTNS_hdCollection" runat="server"></dx:ASPxHiddenField>
    <div style="display: none;">
        <dx:ASPxButton ID="btnActPerform" ClientInstanceName="UCLHSJBTNS_btnActPerform" runat="server" Text="ASPxButton" OnClick="btnActPerform_Click" UseSubmitBehavior="false"></dx:ASPxButton>
    </div>
    <hr/>
    <dx:ASPxButton ID="btnOver" AutoPostBack="false" runat="server" UseSubmitBehavior="false" Text="提交[不走流程]" Visible="false">
        <ClientSideEvents Click="function(s,e){ if (confirm('是否确认不走流程?提交后将会直接生效')) {
                                                                    UCLHSJBTNS_ASPxCallback1.PerformCallback('tjbsx');
                                                                }
                            }"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="btnALL" AutoPostBack="false" runat="server" UseSubmitBehavior="false" Text="收件齐全并登记">
        <ClientSideEvents Click="function(s,e){ if (confirm('是否确认收集齐全并登记')) {
                                                                    UCLHSJBTNS_ASPxCallback1.PerformCallback('sjdj');
                                                                }
                            }"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="btnSJ" runat="server" AutoPostBack="false" UseSubmitBehavior="false" Text="收件">
        <ClientSideEvents Click="function(s,e){UCLHSJBTNS_ASPxCallback1.PerformCallback('sj');}"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="BtnSL" runat="server" Text="受理" UseSubmitBehavior="false" AutoPostBack="false">
        <ClientSideEvents Click="function(s,e){UCLHSJBTNS_ASPxCallback1.PerformCallback('sl');}"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="BtnBSL" runat="server" Text="不受理" UseSubmitBehavior="false" AutoPostBack="false">
        <ClientSideEvents Click="function(s,e){UCLHSJBTNS_ASPxCallback1.PerformCallback('bsl');}"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="BtnBack" runat="server" Text="退回" ClientVisible="false" UseSubmitBehavior="false" AutoPostBack="false">
        <ClientSideEvents Click="function(s,e){UCLHSJBTNS_ASPxCallback1.PerformCallback('th');}"/>
    </dx:ASPxButton>
    <dx:ASPxButton ID="btnClose" runat="server" Text="关闭" ClientVisible="False" UseSubmitBehavior="false" AutoPostBack="false">
        <ClientSideEvents Click="function(s,e){closeWindow();}"/>
    </dx:ASPxButton>
    <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="UCLHSJBTNS_ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){UCLHSJBTNS_ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
</div>